package com.qingrongby.shop.core;

import java.util.Map;

/**
 * @CLASSNAME LocalUser
 * @DESCRIPTION TODO
 * @AUTHOR hzp
 * @DATE 2020/7/23
 * @VERSION 1.0
 **/
public class LocalUser {

    private static ThreadLocal<Map<String,String>> threadLocal=new ThreadLocal<>();

    public static Map getMap(){
        return LocalUser.threadLocal.get();
    }

    public static void set(Map map){
        LocalUser.threadLocal.set(map);
    }

    public static void clear(){
        LocalUser.threadLocal.remove();
    }

    public static String getUid(){
      return   LocalUser.threadLocal.get().get("uid");
    }



}
